﻿Module Module1
    Function Bai08(ByVal n As Integer) As Double
        Dim S As Double = 0
        Dim i As Integer
        For i = 0 To n Step 1
            S = S + (2 * i + 1) / (2 * i + 2)
        Next
        Return S
    End Function
    Sub Main()
        Dim n As Integer
        Console.WriteLine("Nhap so n: ")
        n = Console.ReadLine()
        Dim kq As Double
        kq = Bai08(n)
        Console.WriteLine("S(n)= " & kq)
    End Sub

End Module
